package com.vf.admin.miaodong.service.impl;

import com.vf.admin.client.dto.AppNewDto;
import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.dao.AfterNewDao;
import com.vf.admin.miaodong.entity.AppNew;
import com.vf.admin.miaodong.service.AfterNewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
/**
 * 会话
 */
@Service
public class AfterNewServiceImpl implements AfterNewService {

    @Autowired
    AfterNewDao afterNewDao;

    /**
     * 查询列表
     */
    @Override
    public List<AppNew> list(Map<String, Object> paraMap, SplitPageBean splitPage) {
        return afterNewDao.list(paraMap,splitPage);
    }

    /**
     * 详情
     */
    @Override
    public AppNew get(Integer id) {
        return afterNewDao.get(id);
    }

    /**
     * 添加/修改
     */
    @Override
    public void save(AppNew appNew) {
        afterNewDao.save(appNew);
    }

    /**
     * 删除
     */
    @Override
    public void del(Integer id) {
        afterNewDao.del(id);
    }

    /**
     * 综合查询
     * @param map
     * @param bean
     * @return
     */
    @Override
    public List<AppNew> findList(Map<String, Object> map, SplitPageBean bean) {
        return afterNewDao.findList(map,bean);
    }

    /**
     * 根据用户ID和对方用户id查询会话记录
     * @param userid
     * @param dfuseridid
     * @return
     */
    @Override
    public AppNew getHuiHa(Integer userid, Integer dfuseridid) {
        return afterNewDao.getHuiHa(userid,dfuseridid);
    }

    /**
     * 根据用户ID查询会话记录列表
     * @param userid
     * @param page
     * @return
     */
    @Override
    public List<AppNewDto> getConversation(Integer userid, SplitPageBean page) {
        return afterNewDao.getConversation(userid,page);
    }
}
